Skip to content

Delete many redundant method redefinitions#6877

Merged
JelleZijlstra merged 8 commits intopython:masterfrom
AlexWaygood:redundant-methods
Jan 9, 2022
Merged

Delete many redundant method redefinitions#6877
JelleZijlstra merged 8 commits intopython:masterfrom
AlexWaygood:redundant-methods

Conversation

@AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Jan 9, 2022

All classes implicitly inherit from object in Python 3, so it's almost never necessary to explicitly define __str__ or __repr__ in the stubs (there are a few exceptions, if it's e.g. marked as an abstract method in a base class).

I haven't touched any of the files in the stubs directory in this PR, as some of those need compatibility with Python 2; this PR only touches the standard-library stubs.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants